<script src="/assets/jquery.qrcode.min.js"></script>
<div class="weui-form-preview" id="info_cell">
    <div class="weui-form-preview__hd">
        <label class="weui-form-preview__label">户主姓名</label>
        <em class="weui-form-preview__value" id="realname"><?=$user->realname?></em>
    </div>
</div>
<div style="margin: 0 auto">
    <div id="code" style="margin: 0 auto;width: 100px;height: 100px"></div>

</div>

<script>
    $(function(){
        var str = "<?=$user->id?>";
        $("#code").qrcode({
            render: "table",
            width: 100,
            height:100,
            text: str
        });


    })

</script>
<div class="weui-form-preview" id="info_cell">

    <div class="weui-form-preview__bd">
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label"><img style="width: 17px;display: inline;position: relative;top:2px" src="/assets/img/tel.png">电话</label>
            <span class="weui-form-preview__value" id="phone"><?=$user->phone?></span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label"><img style="width: 17px;display: inline;position: relative;top:2px" src="/assets/img/address.png">住址</label>
            <span class="weui-form-preview__value" id="address"><?=$user->address?></span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label"><img style="width: 17px;display: inline;position: relative;top:2px" src="/assets/img/blue.png">蓝积分</label>
            <span class="weui-form-preview__value" id="blue"><?=$user->blue?></span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label"><img style="width: 17px;display: inline;position: relative;top:2px" src="/assets/img/green.png">绿积分</label>
            <span class="weui-form-preview__value" id="green"><?=$user->green?></span>
        </div>

    </div>

</div>